package com.songmao.pricecloudapitest.utils;

import org.testng.Assert;

/**
 * @author Remy
 * @description :
 * @date 2020-05-07 17:43
 */
public class AssertCore {
    private static LoggerCore loggerCore = new LoggerCore(AssertCore.class);




    public static void assertEquals(Object expected, Object actual) {
        loggerCore.info("assertEquals");
        loggerCore.info("expected:{}", expected);
        loggerCore.info("actual:{}", actual);
        Assert.assertEquals(expected, actual);
    }

    public static void assertContains(String expected, String actual) {
        loggerCore.info("assertContains");
        loggerCore.info("expected:{}", expected);
        loggerCore.info("actual:{}", actual);
        Assert.assertTrue(actual.contains(expected));
    }


    public static void assertTrue(boolean actual, String message) {
        loggerCore.info("assertTure");
        loggerCore.info("actual:{}", actual);
        Assert.assertTrue(actual, message);
    }

    public static void assertTrue(boolean actual) {
        loggerCore.info("actual:{}", actual);
        Assert.assertTrue(actual);
    }

    public static void assertNull(Object actual) {
        loggerCore.info("actual:{}", actual);
        Assert.assertNull(actual);
    }

    public static void assertNull(Object actual, String message) {
        loggerCore.info("actual:{}", actual);
        Assert.assertNull(actual, message);
    }

    public static void assertNotNull(Object actual) {
        loggerCore.info("actual:{}", actual);
        Assert.assertNotNull(actual);
    }

    public static void assertNotNull(Object actual, String message) {
        loggerCore.info("actual:{}", actual);
        Assert.assertNotNull(actual, message);
    }
}
